#!/bin/bash

echo "启动键盘识别检测系统..."
echo

# 检查Python是否安装
if ! command -v python3 &> /dev/null; then
    echo "错误: 未检测到Python3，请先安装Python 3.8或更高版本"
    exit 1
fi

# 检查依赖包
if ! python3 -c "import cv2" &> /dev/null; then
    echo "正在安装依赖包..."
    pip3 install -r requirements.txt
fi

# 启动程序
echo "正在启动键盘识别程序..."
python3 keyboard_inspector.py